package com.cgbg.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cgbg.pojo.SysUser;
import com.cgbg.service.SysUserService;
import com.cgbg.mapper.SysUserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author 城管不管
 * @description 针对表【tb_sys_user】的数据库操作Service实现
 * @createDate 2025-10-18 19:58:33
 */
@Service
@RequiredArgsConstructor
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser>
        implements SysUserService {

    private final SysUserMapper sysUserMapper;

    @Override
    public SysUser findUserById(Long id) {
        SysUser sysUser = sysUserMapper.selectById(id);
        if (sysUser == null) {
            sysUser = new SysUser();
            sysUser.setNickname("码神之路");
        }
        return sysUser;
    }
}




